package com.welike.shibo.mapper;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.welike.shibo.eneity.SysRole;

import java.util.List;

/**
 * Created by fangyu on 2019/11/21.
 */
public interface SysRoleMapper extends BaseMapper<SysRole> {

    /**
     * 获取所有角色
     * @return List<JSONObject>
     */
    List<JSONObject> getAllRoles();

    /**
     *
     * @return
     */
    List<JSONObject> listRole();

    /**
     *
     * @return
     */
    List<JSONObject> listAllPermission();

    /**
     * 新增角色
     * @param requestJson
     */
    int insertRole(JSONObject requestJson);

    JSONObject getRoleInfo(JSONObject requestJson);

    int updateRoleName(JSONObject paramJson);

    int removeRole(JSONObject requestJson);

}